<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich" >

	<ui:composition template="/templates/logadoEmpty.xhtml" >
		<ui:define name="js">
			<h:outputScript library="js" name="jquery.maskedinput-1.2.2.min.js" target="body" />
		</ui:define>
		<ui:define name="css">
			<link rel="stylesheet" type="text/css" href="style/folha.css" media="screen" />
			<link rel="stylesheet" type="text/css" href="style/logado.css" media="screen" />
			<link rel="stylesheet" type="text/css" href="style/styles.css" media="screen" />
			<link rel="stylesheet" type="text/css" href="style/finalizacadastro.css" media="screen" />
			<style type="text/css">
			body {
				margin-left: 0px;
				margin-top: 0px;
				margin-right: 0px;
				margin-bottom: 0px;
			}
			</style>
		</ui:define>
		<ui:define name="mid">
			<h:form id="form03" >
			
			  	<div class="concluir_cadastro">Conclua seu cadastro</div>
			  	<div class="concluir_cadastro2">
			  	
			  	  	<div class="textfield">CPF:</div>
			  	  	<div class="campo">
			  	  		<h:inputText id="cpf" value="#{cadastroFinalBean.cadastroFinal.cpf}" size="30" maxlength="14" required="true" requiredMessage="CPF obrigatório" />
			  	  		<rich:jQuery selector="#form03\:cpf" query="mask('999.999.999-99')" timing="domready" />
			  	  	</div>
			  	  	<div class="cep"></div>
			  	  	
		  	  		<div class="textfield">RG:</div>
		  	  		<div class="campo"><h:inputText value="#{cadastroFinalBean.cadastroFinal.rg}" size="30" required="true" requiredMessage="RG obrigatório"/></div>
		  	  		<div class="cep"></div>
		  	  		
			  	  	<div class="textfield">Sexo:</div>
			  	  	<div class="camposexo">
			  	    	<h:selectOneMenu value="#{cadastroFinalBean.cadastroFinal.sexo}" styleClass="input-style" > 
							<f:selectItems value="#{cadastroFinalBean.sexo}" /> 
						</h:selectOneMenu> 
					</div>	
					<div class="textfield">Data Nascimento:</div>
					<div class="campodata">	
						<h:inputText id="dtnascimento" value="#{cadastroFinalBean.cadastroFinal.dataNascimento}" size="12" required="true" requiredMessage="Data Nascimento Obrigatório" >
							<f:convertDateTime pattern="dd/MM/yyyy" />
						</h:inputText>
						<rich:jQuery selector="#form03\:dtnascimento" query="mask('99/99/9999')" timing="domready" />
			  	  	</div>
			  	  	<div class="cep"></div>
			  	  	
			  	  	<div class="textfield">Celular:</div>
			  	  	<div class="campo5">
			  	    	<h:inputText id="celular" value="#{cadastroFinalBean.cadastroFinal.celular}" maxlength="14" size="17" />
			  	    	<rich:jQuery selector="#form03\:celular" query="mask('(99) 9999-9999')" timing="domready" />
			      	</div>
			  	  	<div class="celular"></div>
			  	  	<div class="campo3">
			      	</div>
			  	  	<div class="operadora">Operadora:</div>
			  	  	<div class="campo5">
			  	  		<h:selectOneMenu value="#{cadastroFinalBean.cadastroFinal.operadora}" styleClass="input-style" > 
							<f:selectItems value="#{cadastroFinalBean.operadora}" /> 
						</h:selectOneMenu> 
			  	  	</div>
			  	  	
			  	  	<div class="textfield">CEP:</div>
			  	  	<div class="cep">
			  	  		<h:inputText id="buscaCep" value="#{cadastroFinalBean.cepBusca}" maxlength="9" size="9" />
			  	    	<rich:jQuery selector="#form03\:buscaCep" query="mask('99999-999')" timing="domready" />
			      	</div>
			  	  	<div class="lupa">
			  	  		<a4j:commandLink id="linkBuscaCep" action="#{cadastroFinalBean.buscarPorCep}" execute="buscaCep linkBuscaCep" render="selectUf selectCidade selectBairro selectLogradouro" >
			  	  			<img src="images/lupa.gif" width="22" height="22" />
			  	  		</a4j:commandLink>
			  	  	</div>
			  	  	<div class="campo5">
			  	  	</div>
			  	  	<div class="campo4">
			  	    	<label for="select7"></label>
			  	  	</div>
			  	  	
			  	  	
			  	  	<div class="textfield">Estado:</div>
			  	  	<div class="campo4">
			  	    	<h:selectOneMenu id="selectUf" converter="ufConverter" value="#{cadastroFinalBean.cadastroFinal.uf}" styleClass="input-style" >
			  	    		<f:selectItem itemLabel="Uf" noSelectionOption="true" /> 
							<f:selectItems value="#{cadastroFinalBean.ufs}" var="uf" itemLabel="#{uf.nomeSimpl}" itemValue="#{uf}" /> 
						</h:selectOneMenu> 
			      	</div>
			      	<div class="cep"></div>
					<div class="cep"></div>
	
	
					<div class="textfield">Cidade:</div>
				  	<div class="campo4">
				  	    <h:selectOneMenu id="selectCidade" converter="cidadeConverter" value="#{cadastroFinalBean.cadastroFinal.cidade}" styleClass="cidade-style" > 
							<f:selectItems value="#{cadastroFinalBean.cidades}" var="cidade" itemLabel="#{cidade.nome}" itemValue="#{cidade}" /> 
						</h:selectOneMenu> 
				    </div>
				  	<div class="campo">
				  	    <h:inputText id="buscaCidade" value="#{cadastroFinalBean.cidadeBusca}" size="35" />
				    </div>
				  	<div class="lupa">
				  	  	<a4j:commandLink id="linkCidade" action="#{cadastroFinalBean.buscarPorCidade}" execute="buscaCidade linkCidade selectUf" render="selectCidade " >
			  	  			<img src="images/lupa.gif" width="22" height="22" />
			  	  		</a4j:commandLink>
				  	</div>
	
			  	  	<div class="textfield">Bairro:</div>
  	  				<div class="campo4">
			  	    	<h:selectOneMenu id="selectBairro" converter="bairroConverter" value="#{cadastroFinalBean.cadastroFinal.bairro}" styleClass="cidade-style"> 
							<f:selectItems value="#{cadastroFinalBean.bairros}" var="bairro" itemLabel="#{bairro.nome}" itemValue="#{bairro}" /> 
						</h:selectOneMenu> 
			      	</div>
  	 	 			<div class="campo">
  	    				<h:inputText id="buscaBairro" value="#{cadastroFinalBean.bairroBusca}" size="35" />
      				</div>
  	  				<div class="lupa">
  	  					<a4j:commandLink id="linkBairro" action="#{cadastroFinalBean.buscarPorBairro}" execute="buscaBairro linkBairro selectCidade" render="selectBairro "  >
			  	  			<img src="images/lupa.gif" width="22" height="22" />
			  	  		</a4j:commandLink>
  	  				</div>
  	  				
			  	  	<div class="textfield">Logradouro:</div>
  	  				<div class="campo4">
				  	    <h:selectOneMenu id="selectLogradouro" converter="logradouroConverter" value="#{cadastroFinalBean.cadastroFinal.logradouro}" styleClass="cidade-style" > 
							<f:selectItems value="#{cadastroFinalBean.logradouros}" var="logradouro" itemLabel="#{logradouro.nome}" itemValue="#{logradouro}" /> 
						</h:selectOneMenu> 
      				</div>
  	  				<div class="campo">
  	    				<h:inputText id="buscaLogradouro" value="#{cadastroFinalBean.logradouroBusca}" size="35" />
  	  				</div>
  	  				<div class="lupa">
  	  					<a4j:commandLink id="linkLogradouro" action="#{cadastroFinalBean.buscaPorLogradouro}" execute="buscaLogradouro linkLogradouro selectBairro" render="selectLogradouro " >
			  	  			<img src="images/lupa.gif" width="22" height="22" />
			  	  		</a4j:commandLink>
  	  				</div>
			  	  	
			      	
			      	<div class="textfield">Nº:</div>
			  	  	<div class="campo3">
			  	  		<h:inputText value="#{cadastroFinalBean.cadastroFinal.numero}" size="8" />
			      	</div>
			  	  	<div class="complemento">Complemento:</div>
			  	  	<div class="campo4">
			  	  		<h:inputText value="#{cadastroFinalBean.cadastroFinal.complemento}" size="20" />
			      	</div>
			  	  	
			  	  	<div class="botao_voltar" id="linkbranco">
			  	  		<a4j:commandLink action="#{cadastroFinalBean.finalizaCadastro}" execute="@all" render="@all" value="Finalizar Cadastro" />
			  	  		
			  	  	</div>
			  	  	
		  		</div>
		  		
			  	<div class="botao_fincadastro" id="linkbranco">
			  		<a4j:commandLink action="#{telaInicialBean.sair}" immediate="true" value="Voltar" />
			  	</div>
		

			</h:form>
		</ui:define>
	</ui:composition>

</html>